#pragma once 

#include <sys/types.h>
#include <sys/stat.h>
#include<iostream>
using namespace std;
#include<unistd.h>
#include<fcntl.h>
#include<string>  

const string gipefile="./fifo";
const mode_t gmode=0600;
const int gdefultfd=-1;
const int gsize=1024;
const int gForRead=O_RDONLY;
const int gForWrite=O_WRONLY;



int OpenPipe(int flag)
{
   int fd=open(gipefile.c_str(),flag);
   if(fd<0)
   {
    cerr<<"open file false"<<endl;
   }
   return fd;
}
void ClosePipeHelper(int fd)
{
   if(fd>=0)
   {
     close(fd);
   }
}

